/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aptech.search;

import com.aptech.entity.ContactPerson;
import com.aptech.session.ContactPersonFacadeLocal;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author DucMinh
 */
@ManagedBean
@RequestScoped
public class SearchContactPersonBeans {
    @EJB
    private ContactPersonFacadeLocal contactPersonFacade;

    /** Creates a new instance of SearchContactPersonBeans */
    public SearchContactPersonBeans() {
    }
    private String field;
    private Object value;
    private List<ContactPerson>listcontactperson;

    public String getField() {
        return field;
    }

    public void setField(String field) {
        this.field = field;
    }

    public List<ContactPerson> getListcontactperson() {
        return listcontactperson;
    }

    public void setListcontactperson(List<ContactPerson> listcontactperson) {
        this.listcontactperson = listcontactperson;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }
    public String searchcontactperson()
    {
        listcontactperson=contactPersonFacade.searchcontactperson(field, value);
        return "ResultContactPerson";
    }
}
